package com.sl.plugin.step.login;

import com.sl.core.engine.meta.impl.AbstractProcessCompDescriptor;
import com.sl.core.engine.step.ProcessCompService;
import com.sl.core.engine.step.impl.AbstractProcessComp;

import java.util.List;
import java.util.Map;

/**
 */
//@Compensation(listener = NormalRowListener.class, type = CompensationType.SERVICE_COMPENSATION)
public class LogininfoComp extends AbstractProcessComp<List<Map<String, Object>>, List<Map<String, Object>>> implements ProcessCompService {

    public LogininfoComp(AbstractProcessCompDescriptor abstractProcessCompDescriptor) {
        super(abstractProcessCompDescriptor);


    }


    @Override
    public List<Map<String, Object>> input(List<Map<String, Object>> param) {
        String userId = this.getPipeline().getVariable("userId");
        for (Map<String, Object> map : param) {
            map.put("userId",userId);
        }

        return param;
    }

}
